<template>
    <div style="height: 100%;position: relative">
        <tab-control :tabs="tabLists" class="tab"></tab-control>
        <router-view></router-view>
    </div>
</template>
<script>
export default {
    data() {
        return {
            tabLists: []
        };
    },
    created() {
        const defaultTabs = [...this.$route.matched.slice(-2, -1)[0].meta.tabs]
        const tabsLabels = ['registryAccess', 'flowDistribution', 'IMChat', 'videoConsult']
        /*this.tabLists = [
            { label: "注册访问", name: "registryAccess" },
            { label: "流量分布", name: "flowDistribution" },
            { label: "IM聊天", name: "IMChat" },
            // { label: "企微添加", name: "wechatAdd" },
            { label: "视频咨询", name: "videoConsult" },
        ]*/
        this.tabLists = defaultTabs.filter(tab => tabsLabels.includes(tab.name))
        /*
        this.tabLists = [...this.$route.matched.slice(-2, -1)[0].meta.tabs];
        this.tabLists.pop();
        */
    },
    mounted() {
        this.$store.dispatch('setPageCenterTitle', '元通汽车官方平台BI报表');
    },
    destroyed() {
        this.$store.dispatch('setPageCenterTitle', '');
    }
};
</script>
<style lang="scss" scoped>
</style>